import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'counter_get_easy_logic.dart';

class CounterGetEasyPage extends StatelessWidget {
  final logic = Get.put(CounterGetEasyLogic());
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('计数器---简单式'),
      ),
      body: Center(
          child: GetBuilder<CounterGetEasyLogic>(
        builder: (logicGet) => Text(
          '点击了${logicGet.count}次',
          style: TextStyle(fontSize: 20),
        ),
      )),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          logic.increase();
        },
        child: Icon(Icons.add),
      ),
    );
  }
}
